package com.whiteape.book.model.type;

import android.graphics.Color;

import com.whiteape.book.R;

public class MediaType {
    public static final int MEDIA_TYPE_NOVEL = 0;
    public static final int MEDIA_TYPE_COMIC = 1;
    public static final int MEDIA_TYPE_VIDEO = 2;
    public static final int MEDIA_TYPE_ALL = 100;

    public static String getName(int type) {
        if (type == MEDIA_TYPE_NOVEL) {
            return "小说";
        } else if (type == MEDIA_TYPE_COMIC) {
            return "漫画";
        } else if (type == MEDIA_TYPE_VIDEO) {
            return "影视";
        }

        return "错误类型";

    }

    public static int getColorInt(int type) {

        if (type == MEDIA_TYPE_NOVEL) {
            return Color.parseColor("#90C5F0");
        } else if (type == MEDIA_TYPE_COMIC) {
            return Color.parseColor("#F88F55");
        } else if (type == MEDIA_TYPE_VIDEO) {
            return Color.parseColor("#67CCB7");
        }

        return Color.parseColor("#F6BC7E");
    }

}
